﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SAAC.DTO;
using SAAC.DAL;

namespace SAAC.BLL
{
    public class ExtensaoBLL
    {
        protected ExtensaoDAL _extensaoDAL;

        public ExtensaoBLL()
        {
            if (_extensaoDAL == null)
                _extensaoDAL = new ExtensaoDAL();
        }

        public ExtensaoDTO Select(ExtensaoDTO dto, string order = null)
        {
            try
            {
                return _extensaoDAL.Select(dto, order);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public List<ExtensaoDTO> SelectAll(ExtensaoDTO dto, string order = null, int limit = 1000)
        {
            try
            {
                return _extensaoDAL.SelectAll(dto, order, limit);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Insert(ExtensaoDTO dto)
        {
            try
            {
                _extensaoDAL.Insert(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Update(ExtensaoDTO dto)
        {
            try
            {
                _extensaoDAL.Update(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Delete(ExtensaoDTO dto)
        {
            try
            {
                _extensaoDAL.Delete(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

    }
}
